package com.axjy.scheduler.controller;

import com.axjy.comm.pojo.TpScheduler;
import com.axjy.comm.vo.Result;
import com.axjy.scheduler.service.SchedulerService;
import com.axjy.scheduler.vo.SeatPriceVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.*;

@RestController
public class SchedulerController {
    @Resource
    private SchedulerService schedulerService;

    @RequestMapping("/p/queryItemScheduler")
    public Result queryItemScheduler(@RequestBody TpScheduler tpScheduler){
        List<TpScheduler> list = schedulerService.queryItemScheduler(tpScheduler.getItemId());
        return  Result.success(list);
    }


    @RequestMapping("/p/queryItemPrice")
    public Result queryItemPrice(@RequestBody SeatPriceVo seatPriceVo){
        List<SeatPriceVo> list = schedulerService.queryItemPrice(seatPriceVo.getScheduleId());
        return Result.success(list);
    }
}
